﻿
using System;

namespace TestDB.Data
{
    public static class CommonFunctions
    {
        public static bool IsEqual(double? x, double? y)
        {
            if (x == null && y == null)
                return true;
            else if (x != null && y != null)
            {
                return Math.Abs((double)x - (double)y) < 1e-6;
            }
            else
                return false;
        }

        public static bool IsEqual(string x, string y)
        {
            if (x == null)
                return y == null;
            else
                return x.Equals(y);
        }
    }
}